Tom,
A small problem I've been unable to find a solution to.... I've just added a stepper, running on a Gecko, as my "B" axis. This operates my power drawbar (PDB). To grab the tool, I set an output bit which activates an air solenoid to drop the PDB onto the drawbar, then I spin the B axis 1.5 turns to release the tool, then turn off the air solenoid. Releasing the tool is, more or less, the reverse. This is all done in a C program integrated into my pendant "driver", using MoveRel, and MoveRelAtVel.
Now, here's the problem - When I get to a toolchange in a G-code program, I do the M6, then a MSG comment, prompting me to swap the tool. I run the C program to release the current tool, then grab the new tool. I then dismiss the MSG dialog. But, sometimes, when the G-code starts running again, the PDB rotates. I'm sure what's happening is the interpreter is returning the B axis to the position it was at before the toolchange, "un-doing" the moves done to release then grab the new tool.
How can I make it stop doing that? I've tried adding a "EnableAxisDest(4, 0.0)" both before at the entry and exit of the C functions to operate the drawbar, but the moves still sometimes happen. What I'd really like to do is have the B axis disabled except when the drawbar is actually operating, but if I do that, then nothing moves any more.
Regards,
Ray L.